import Quick from ".";
import { WeaInput, WeaLocaleProvider } from 'ecCom';
const { getLabel } = WeaLocaleProvider;

export default class Main extends Quick {
    state = {
        detailMark: '',
        rowIndexMark: ''
    }
    getComponent = () => {
        const { detailMark, rowIndexMark } = this.state;
        return [
            <div>
                <WeaInput ecId={`${this && this.props && this.props.ecId || ''}_WeaInput@bchhc0@`}
                    style={{ width: 200 }}
                    placeholder={getLabel('528693','请输入明细表标示') }
                    value={detailMark}
                    onChange={v => this.setState({ detailMark: v })}
                />
            </div>,
            <div style={{marginTop:8}}>
                <WeaInput ecId={`${this && this.props && this.props.ecId || ''}_WeaInput@sgdlu4@`}
                    style={{ width: 200 }}
                    placeholder={getLabel('528696','需要删除的行标示') }
                    value={rowIndexMark}
                    onChange={v => this.setState({ rowIndexMark: v })}
                />
            </div>
        ]
    }
    getTitle = () => {
        return 'excel.delDetailRow';
    }
    getScript = () => {
        return `excel.delDetailRow('${this.state.detailMark}','${this.state.rowIndexMark}');`
    }
}